from io import BytesIO

from damo.flask_test_file_up import app


def send_file(client, name):
    print("**************")
    with open(name, 'rb') as f:
        client.post('/', data={'file': (BytesIO(f.read()), name)})


if __name__ == "__main__":
    with app.test_client() as client:
        send_file(client, './zlf_wanfangstandard_20200106.db3')
        # send_file(client, 'megacat-2.png')